﻿@page "/"

<div style="margin:30px">
<i>This is a component</i>
<Greeting Message="Hello World" @ref="Greeter" ></Greeting>
</div>

<button class="btn btn-primary" @onclick="Welcome">Welcome</button>
<button class="btn btn-primary" @onclick="Goodbye">Goodbye</button>

@code
{
    Greeting Greeter;

    void Welcome()
    {
        Greeter.Say("Welcome");
    }

    void Goodbye()
    {
        Greeter.Say("Goodbye");
    }
}